package com.juc.reentrantlock;


public class ReentrantLockNoFairTest {

	public static void main(String[] args) throws InterruptedException {

		/*
		 * Thread thread = new Thread(mService); thread.start();
		 */
		/*ExecutorService threadPool = Executors.newCachedThreadPool();
		for (int i = 0; i < 10; i++) {
			threadPool.execute(new MService());
		}*/
		MService mService = new MService();
		Thread thread = new Thread(mService,"m1"); 
		
		Thread thread1 = new Thread(mService,"m2"); 
		
		Thread thread2 = new Thread(mService,"m3"); 
		Thread thread3 = new Thread(mService,"m4"); 
		Thread thread4 = new Thread(mService,"m5"); 
		Thread thread5 = new Thread(mService,"m6");
		thread.start();
		thread1.start();
		thread2.start();
		thread3.start();
		thread4.start();
		thread5.start();
	}
}
